<template>
	<view class="drift-list">
		<view class="" v-for="(item,index) in Data.list">
			
			<!-- <userAvatar :src="item.userInfo.avatar"></userAvatar> -->
			
			{{item.value}}
		</view>
	</view>
</template>

<script setup>
	import userNaem from '@/components/user_name_text/user_name_text.vue';
	import userAvatar from "@/components/user_avatar/user_avatar.vue"
	import overallRequest from "@/utool/http/http.js"
	import {
		ref,
		reactive
	} from 'vue'
	import {
		onReady,onReachBottom
	} from '@dcloudio/uni-app'
	
	const Data = reactive({
		page: null,
		pages: null,
		limit: null,
		total: null,
		list:[]
	})
	function GetDriftList(){
		let url = "/manage/GetDriftList"
		overallRequest(url, {})
		.then(r=>{
			let {data} = r 
			let {
				page,limit,list,total,pages
			} = data 
			Data.pages = pages 
			Data.list.push(...list)
		})
		.catch(e=>{
			console.log(e);
		})
	}
	onReady(() => {
		GetDriftList()
	})
	
	// 滚动页面到底部
	onReachBottom(() => {
		let page = Data.page
		let pages = Data.pages
		if (page >= pages) {
			return
		} else {
			Data.page++
			GetDriftList()
		}
	})
	
</script>

<style scoped>
	
	page {
		height: 100%;
	}
	
	.drift-list {
		display: flex;
		flex-direction: column;
		background: #c3c3c344;
		gap: 15px;
		padding: 30rpx 20px;
		height: 100%;
	}

</style>